Host the Cobra Web Service Instances

Use this procedure to host instances of the Cobra Web Service on the Cobra Concurrency machine or on another machines.

When hosting to another machine, you will need to install the Cobra 8.3 Cumulative Update 08 or higher on that machine. You must update the Cobra.WebService.Host.exe.2.config or the Cobra.WebService.Host.exe.3.config file which are both shipped with Cobra. These files are located in your Cobra installation directory.

The default port for the first new Cobra Web Service instance is 8117. The default port for the second new instance is 8118.

To host Cobra Web Service instances:

  1. Locate the Cobra.WebService.Host.exe.2.config file that resides on the Cobra folder and open it using a text editor (such as Notepad).
  2. Find the following line:
    <add baseAddress="https://localhost:8117/CobraWebService"/>
  3. Replace localhost with the name of the machine, and replace 8117 if the port number conflicts with an external system.
    For example:
    <add baseAddress="https://MCOBPROCSER:8117/CobraWebService" />
    Note: If this instance is not deployed on the Cobra Concurrency machine or is deployed on another machine, make sure that the firewall settings are allowed to communicate with the port defined here. Take note of the entire URL appended with /service. This will be defined in the Cobra Web Service Gateway Configuration Tool. For example: https://COBWSHOST:8117/CobraWebService/service.
  4. Find the following lines:
    <appSettings>
    <add key="ServiceName" value="Cobra Web Service 2"/>
    <add key="ServiceDescription" value="The second Cobra Web Service instance."/>
    </appSettings>
  5. Replace ServiceName and ServiceDescription with a unique values.
    For example:
    <appSettings>
    <add key="ServiceName" value="Cobra Web Service MPCI 8117"/>
    <add key="ServiceDescription" value="CWS for Multi-Project Concurrency Integration 1"/>
    <appSettings>
    Note: To easily trace specific web service in the logs, Deltek recommends entering meaningful values for ServiceName and ServiceDescription (for example, defining the Cobra Web Service for the Multi-Project Concurrent Integration and the port number). If the machine you are hosting this Cobra Web Service instance is hosting or will host other Cobra Web Service instances, ServiceName must be unique.
  6. Save and close the configuration file.
  7. Launch the Command Prompt and select Run as administrator.
  8. On the Administrator Command Prompt window, enter the following lines:

    "<Cobra Folder Path>\Cobra.WebService.Host.exe" –install –configfile=<configfile>

    For example: "<Cobra Folder Path>\Cobra.WebService.Host.exe" –install –configfile=Cobra.WebService.Host.exe.2.config

    The command deploys the host into the Windows services.
    Note: The command creates a Windows Service using the local system account. If your Cobra .csv files are stored in a network share, you will need to configure the Windows Service Log On account to use a domain account.
  9. Close the Administrator Command Prompt window.
  10. Launch the Windows Services Manager (Services MMC).
  11. Locate the Name that matches the ServiceName provided in the configuration file.
  12. Right-click that Windows service and select Properties.
  13. On the Log On tab, specify the dedicated Windows Domain Account in the This account field.
    Note: If you experience 401 or unauthorized errors when you connect to the Web Service, see the Troubleshooting section.
  14. Close the Properties window.
  15. Restart the Windows Services.
  16. Check whether or not the host is running in the Windows Services by browsing the address from the configuration file in an internet browser.
    For example: http://localhost:8117/CobraWebService.
    If the host is running, the page that displays confirms that you have created a service and provides details on how to test the service. If a page does not display, the host is either not configured correctly, the port might be blocked by the Windows fire wall, or the service is not running in the Windows services.
    Note: If you want to host another instance of the Cobra Web Service, locate the Cobra.WebService.Host.exe.3.config file and perform similar steps. If you want to add more instances, create a copy of the application configuration file and perform similar steps. Make sure you provide different port numbers for these instances.